// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

0000:

0390: load_txd_dictionary 'LD_DUAL'
038F: load_texture "white" as 10

0AF2: 4@ = get_int_from_ini_file "CLEO\SAM_LASER_OFFSET.ini" section "PLACE" key "OFFSET"                                                                                          
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR with_offset 0.0 4@ -1.0
4@ += 3.5
0AF3: write_int 4@ to_ini_file "CLEO\SAM_LASER_OFFSET.ini" section "PLACE" key "OFFSET"
  
12@ = Object.Create(2985, 1@, 2@, 3@)            
071F: set_object 12@ health_to 99999
Object.SetImmunities(12@, 1, 1, 1, 1, 1)



while true
    wait 0
    0AB4: 14@ < 218
    IF 14@ == TRUE                                                 
    THEN                                                        
        IF 03CA:   object 12@ exists                            
        THEN                                                    
            OBJECT.RemoveReferences(12@)                        
            OBJECT.Destroy(12@)                                 
            END_THREAD                                          
        END                                                     
    END                                  
    if AND
        player.Defined($PLAYER_CHAR)
        03CA:   object 12@ exists       
    then
        OBJECT.StorePos(12@, 1@, 2@, 3@)
        3@ += 10.0
        if 0AE2: 28@ = random_vehicle_near_point 1@ 2@ 3@ in_radius 500.0 find_next 1 pass_wrecked 0 // aoei aoie  ?aena 100 ?eo
        then
            IF 056E:   car 28@ defined 
            JF CONTINUE
            13@ = CAR.Model(28@)
            //PLANE CASE
            IF NOT 13@ == 460                                   
            JF @DESTROY                                              
            IF NOT 13@ == 476                                         
            JF @DESTROY                                              
            IF NOT 13@ == 511                                         
            JF @DESTROY                                              
            IF NOT 13@ == 512                                         
            JF @DESTROY                                              
            IF NOT 13@ == 513                                         
            JF @DESTROY                                              
            IF NOT 13@ == 519                                         
            JF @DESTROY                                              
            IF NOT 13@ == 520                                         
            JF @DESTROY                                              
            IF NOT 13@ == 553                                         
            JF @DESTROY                                              
            IF NOT 13@ == 577                                         
            JF @DESTROY                                              
            IF NOT 13@ == 592                                         
            JF @DESTROY                                            
            IF NOT 13@ == 593                                      
            JF @DESTROY                                              
            //HELI CASE
            IF NOT 13@ == 417                                                     
            JF @DESTROY                                                                                
            IF NOT 13@ == 425                                                        
            JF @DESTROY                                                                                
            IF NOT 13@ == 447                                                    
            JF @DESTROY                                                                                
            IF NOT 13@ == 469                                                      
            JF @DESTROY                                                                                
            IF NOT 13@ == 487                                                      
            JF @DESTROY                                                                                
            IF NOT 13@ == 488                                                 
            JF @DESTROY                                                                             
            IF NOT 13@ == 497                                             
            JF @DESTROY                                                                              
            IF NOT 13@ == 548                                                      
            JF @DESTROY                                                                                
            IF NOT 13@ == 563                                                     
            JF @DESTROY 
            CONTINUE
            
            
            :DESTROY
                33@ = 0
                WHILE TRUE
                    WAIT 0
                    IF 33@ >= 5000
                    THEN BREAK
                    END
                    IF 056E:   car 28@ defined 
                    JF BREAK
                    IF NOT CAR.Wrecked(28@)
                    JF BREAK
                    IF 03CA:   object 12@ exists
                    JF BREAK
                    0400: store_coords_to 2@ 3@ 4@ from_actor 12@ with_offset 0.0 1.0 1.3
                    CAR.StorePos(28@, 5@, 7@, 8@)                                                       
                    0089: 9@ = 5@ // (float)                                                            
                    0063: 9@ -= 2@ // (float)                                                           
                    0089: 18@ = 7@ // (float)                                                           
                    0063: 18@ -= 3@ // (float)                                                          
                    0604: get_Z_angle_for_point 9@ 18@ store_to 19@                                     
                    //097B: play_audio_at_object 12@ event 1133
                    Object.Angle(12@) = 19@                                                              
                    0400: store_coords_to 0@ 1@ 2@ from_actor 12@ with_offset 0.0 1.0 0.5
                    0AB1: call_scm_func @getScreenXYFrom3DCoords5 3 3D_coords_X 0@ Y 1@ Z 2@ store_screen_X_to 3@ Y_to 4@         
                    0AB1: @DRAW_OUTLINED_BOX3 9 POS 3@ 4@ SIZE 50.0 80.0 RGBA 200 0 0 255 THICKNESS 0.5                          
                    0AB1: @DRAW_LINE1 9 POS 3@ 4@  _TO_ 200.0 400.0 RGBA 200 0 0 255 THICKNESS 1.5           
                    0208: 29@ = random_float_in_ranges -2.6 2.6 
                    0208: 30@ = random_float_in_ranges -2.6 2.6
                    0407: store_coords_to 4@ 5@ 6@ from_actor 28@ with_offset 29@ 0.0 30@
                    CAR.StorePos(28@, 4@, 5@, 6@)
                    04D5: create_corona_at 1@ 2@ 3@ radius 0.1 type 2 flare 2 RGB 0 200 0 
                    06BC: create_M4_shoot_from 1@ 2@ 3@ target 4@ 5@ 6@ energy 500
                    0948: create_explosion_at 4@ 5@ 6@ type TYPE 1 FIRE 1 camera_shake 0.1 
                END    
                
                
            
        end
    END
end

//
:DRAW_LINE1
0087: 11@ = 2@ // (float)
0087: 12@ = 3@ // (float)
0509: 10@ = distance_between_XY 0@ 1@ and_XY 2@ 3@
10@ -= 37.0 {REMOVE STRANGE OFFSET AT END}
0063: 2@ -= 0@ // (float) 
0063: 3@ -= 1@ // (float) 
0604: get_Z_angle_for_point 2@ 3@  store_to 9@
9@ += 84.0
005B: 0@ += 11@
0@ /= 2.0    {MITTE} // get center pos
005B: 1@ += 12@
1@ /= 2.0
03F0: enable_text_draw 1
074B: draw_texture 10 position 0@ 1@ scale 10@ 8@ angle 9@ color 4@ 5@ 6@ 7@
0AB2: 0

:DRAW_OUTLINED_BOX3
0087: 14@  = 8@ // (float)
0087: 12@ = 2@ // (float)
0087: 13@ = 3@ // (float)
12@ /= 2.0 // (float)
13@ /= 2.0 // (float)
0087: 8@  = 0@ // (float)
005B: 8@ += 2@  // (float)
0063: 8@ -= 12@  // (float) 
0087: 9@  = 0@ // (float) 
0063: 9@ -= 2@  // (float)
005B: 9@ += 12@  // (float) 
0087: 10@ = 1@ // (float)
005B: 10@ += 3@  // (float) 
0063: 10@ -= 13@  // (float) 
0087: 11@ = 1@ // (float)     by OpcodeXe
0063: 11@ -= 3@  // (float)
005B: 11@ += 13@  // (float)   
03F0: enable_text_draw 1                                    
038E: draw_box_position  8@ 1@  size 14@ 3@ RGBA 4@ 5@ 6@ 7@ //  links
038E: draw_box_position  9@ 1@  size 14@ 3@ RGBA 4@ 5@ 6@ 7@  // rechts
038E: draw_box_position  0@ 10@  size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // oben 
038E: draw_box_position  0@ 11@  size 2@ 14@ RGBA 4@ 5@ 6@ 7@  // unten 
0AB2: 0



//
:getScreenXYFrom3DCoords5
0AC7: 14@ = var 0@ offset
0AC7: 15@ = var 3@ offset
0AC7: 16@ = var 6@ offset
0AC7: 17@ = var 9@ offset
0AA5: call 0x70CE30 num_params 6 pop 6  0 0 17@ 16@ 15@ 14@
0007: 12@ = 640.0
0007: 13@ = 448.0
0A8D: 14@ = read_memory 0xC17044 size 4 virtual_protect 0
0A8D: 15@ = read_memory 0xC17048 size 4 virtual_protect 0
0093: 14@ = integer 14@ to_float
0093: 15@ = integer 15@ to_float
0073: 12@ /= 14@
0073: 13@ /= 15@
006B: 3@ *= 12@
006B: 4@ *= 13@
0AB2: ret 2 3@ 4@